<?php
// Note: This file is included from the library/People/People.Control.ApplyForm.php class.

$TermsOfServiceLink = sprintf(
	' <a href="%1$s" onclick="PopTermsOfService(\'%1$s\'); return false;">%2$s</a>',
	$this->Context->Configuration['WEB_ROOT'] . 'termsofservice.php',
	$this->Context->GetDefinition('TermsOfService'));

?>
	<div class="About">
		<?php echo $this->Context->GetDefinition('AboutMembership'); ?>
		<p><?php
			printf('<a href="%s">%s</a>',
				GetUrl($this->Context->Configuration, $this->Context->SelfUrl),
				$this->Context->GetDefinition('BackToSignInForm'));
		?></p>
	</div>
	<div id="Form" class="ApplyForm">
		<fieldset>
			<legend><?php echo $this->Context->GetDefinition('MembershipApplicationForm'); ?></legend>

			<?php
			$this->CallDelegate('PreWarningsRender');
			$this->Render_Warnings();
			$this->Render_PostBackForm($this->FormName);
			?>

				<ul>
					<li>
						<p><?php echo $this->Context->GetDefinition('Register with an OpenID'); ?></p>
						<label for="txtOpenIdUrl"><?php echo $this->Context->GetDefinition('Your OpenID'); ?></label>
						<input id="txtOpenIdUrl" type="text" name="OpenIdUrl" value="<?php echo $this->Applicant->OpenIdUrls[0]; ?>" class="Input" />
					</li>
				</ul>
				<div class="Submit">
					<input type="submit" name="btnApply" value="<?php echo $this->Context->GetDefinition('Proceed'); ?>" class="Button" />
				</div>
				<ul>

					<?php $this->CallDelegate('PreInputsRender'); ?>

					<li>
						<p><?php
						echo $this->Context->GetDefinition('Or create a classic account - ');
						echo $this->Context->GetDefinition('AllFieldsRequired');
						 ?></p>
						<label for="txtEmail"><?php echo $this->Context->GetDefinition('EmailAddress'); ?></label>
						<input id="txtEmail" type="text" name="Email" value="<?php echo $this->Applicant->Email; ?>" class="Input" maxlength="160" />
					</li>
					<li>
						<label for="txtUsername"><?php echo $this->Context->GetDefinition('Username'); ?></label>
						<input id="txtUsername" type="text" name="Name" value="<?php echo $this->Applicant->Name; ?>" class="Input" maxlength="20" />
					</li>
					<li>
						<label for="txtNewPassword"><?php echo $this->Context->GetDefinition('Password'); ?></label>
						<input id="txtNewPassword" type="password" name="NewPassword" value="<?php echo $this->Applicant->NewPassword; ?>" class="Input" />
					</li>
					<li>
						<label for="txtConfirmPassword"><?php echo $this->Context->GetDefinition('PasswordAgain'); ?></label>
						<input id="txtConfirmPassword" type="password" name="ConfirmPassword" value="<?php echo $this->Applicant->ConfirmPassword; ?>" class="Input" />
					</li>
					<?php
					$this->CallDelegate('PostInputsRender');
					?>
					<?php
					$this->CallDelegate('PreTermsCheckRender');
					?><li id="TermsOfServiceCheckBox">
						<?php echo GetBasicCheckBox('AgreeToTerms', 1, $this->Applicant->AgreeToTerms,' id="AgreeToTerms"'); ?>

						<label for="AgreeToTerms" style="display: inline; float: none; width: auto;"><?php
						echo str_replace(
							'//1', $TermsOfServiceLink,
							$this->Context->GetDefinition('IHaveReadAndAgreeTo'));
						?></label>
					</li>
				</ul>
				<div class="Submit">
					<input type="submit" name="btnApply" value="<?php echo $this->Context->GetDefinition('Proceed'); ?>" class="Button" />
				</div>
			</form>
		</fieldset>
	</div>